<form class = "ajax-form" action = "{:url('')}" method="post">
    <div class = "form-group row">
        <label class = "col-sm-2 col-xs-12">用户名</label>
        <div class = "col-sm-10 col-xs-12">
            <input type="text" name="username" class="form-control" value = "{$user.username|default=''}" disabled placeholder="请填写用户名"/>
        </div>
    </div>
    <div class = "form-group row">
        <label class = "col-sm-2"></label>
        <div class = "col-sm-10">
            {volist name="auths" id="vo"}
            <input type="checkbox" name="auths[]" value = "{$vo.id}" {if condition="in_array($vo.id, $auth_ids)"}checked{/if}/> {$vo.name}
            {/volist}
        </div>

    </div>

    {if isset($user['id'])}<input type='hidden' value='{$user.id}' name='id'>{/if}
    <div class = "form-group user-btn-group">
        <button class="btn btn-success" type='submit'>保存</button>
        <button class="btn btn-warning" type='button' data-confirm="确定要取消数据保存吗？" data-dismiss="modal">取消</button>
    </div>
</form>